Repository navigation
docs(agents): the duplicate-id gotcha names when ids clash - #4976
Conversation
One world already suffixes a second robot with a taken id (Simulation.unique_id gives so101_2), so the gotcha read as if every pair of same-named robots clashed. The clash is between robots in different worlds, whose tools share a name in one Agent.
yinsong1986
left a comment
There was a problem hiding this comment.
Summary
Rewrites one bullet in AGENTS.md > Known gotchas so it matches what the code does: a second robot with a taken id in the same world is suffixed by Simulation.unique_id (so101 -> so101_2, simulation/_sceneops.py), while robots in different worlds each keep the bare id and so collide as robot_so101 when both tools are handed to one Agent. The claims check out: unique_id is per-Simulation (_robots is instance state), the tool prefix is robot, and _DeviceTool.supports_hot_reload is False, so strands' ToolRegistry.register_tool raises ValueError("Tool name 'robot_so101' already exists. ...") — the quoted message prefix is exact. Docs-only change to a non-user-facing file; no behaviour change, so no changelog.d fragment is needed and the fragment gate does not require one.
What's good
- Corrects a gotcha that was actively misleading (the old line implied every same-id pair clashed, which
unique_idprevents in-world). - Cites the mechanism (
Simulation.unique_id) and the exact refusal text, in the same style as the surrounding bullets. - One change, conventional title, within the 120-column convention.
The AGENTS.md gotcha said two robots with the same id clash as tool names. In one world they don't:
Simulation.unique_idgives the second robotso101_2, and anAgentseesrobot_so101androbot_so101_2.The clash is between robots in different worlds, where both keep
so101and the second tool is refused withTool name 'robot_so101' already exists. The line now says that.Checked: two
Robot("so101")in one world, and one in each of twoSimulation()s, passed to oneAgent.Documentation only, so no changelog fragment.